<%--
  Created by IntelliJ IDEA.
  User: 谢兴鑫
  Date: 2022/5/24
  Time: 下午 03:08
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<link rel="stylesheet" href="${pageContext.request.contextPath}/static/layui/css/layui.css"/>
<script type="text/javascript" src="${pageContext.request.contextPath}/static/layui/layui.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/static/js/jquery-3.5.1.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/static/js/ajaxForm.js"></script>

<html>
<head>
    <meta charset="utf-8">
    <title>示例演示</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- 注意：项目正式环境请勿引用该地址 -->
</head>
<body>
<fieldset class="layui-elem-field layui-field-title" style="margin-top: 50px;">
    <legend>通知公告</legend>
</fieldset>
    <c:forEach items="${noticelist}" var="nl">
<div class="layui-collapse" lay-accordion="">
    <div class="layui-colla-item">
        <h2 class="layui-colla-title">${nl.title}</h2>
        <div class="layui-colla-content">
            <p>
                    ${nl.content}</p>
        </div>
    </div>
    </c:forEach>
</div>
<script>
    layui.use(['dropdown', 'util', 'layer'], function () {
        var element = layui.element;
        var layer = layui.layer;

        //折叠面板点击事件
        element.on('collapse(test)', function (data) {
            layer.msg('展开状态：' + data.show);
        });
    });
</script>

</body>
</html>
